package com.probox.common.entity.service.customer;

import java.util.HashMap;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.probox.common.entity.query.BaseQuery;
import com.probox.customer.api.domain.CustomerInfoAccount;
import com.probox.customer.api.domain.CustomerInfoAccountVo;
import com.probox.common.entity.vo.customer.CustomerInfoLevelVo;
import com.probox.common.entity.vo.customer.CustomerInfoVo;
import com.probox.common.entity.vo.customer.open.CustomerPhoneLoginVo;

/**
 * 客户账号Service接口
 *
 * @author zhusiyu
 * @date 2021-05-25
 */
public interface ICustomerInfoAccountService extends IService<CustomerInfoAccount> {


        /**
         * 查询客户账号
         *
         * @param customerAccountUid 客户账号ID
         * @return 客户账号
         */
        public CustomerInfoAccount selectCustomerInfoAccountById(Long customerAccountUid);


        /**
         * 查询客户账号列表
         *
         * @param customerInfoAccount 客户账号
         * @return 客户账号集合
         */
        public List<CustomerInfoAccount> queryList(CustomerInfoAccount customerInfoAccount);


        /**
         * 新增客户账号
         *
         * @param customerInfoAccount 客户账号
         * @return 结果
         */
        public boolean insertCustomerInfoAccount(CustomerInfoAccount customerInfoAccount);

        /**
         * 修改客户账号
         *
         * @param customerInfoAccount 客户账号
         * @return 结果
         */
        public boolean updateCustomerInfoAccount(CustomerInfoAccount customerInfoAccount);

        /**
         * 批量删除客户账号
         *
         * @param customerAccountUids 需要删除的客户账号ID
         * @return 结果
         */
        public boolean deleteCustomerInfoAccountByIds(Long[] customerAccountUids);


        public CustomerInfoAccount selectUserByUserName(String username);

        /**
         * 前端用户登录
         * @param account
         * @return
         */
        public CustomerInfoAccount login(CustomerInfoAccountVo account);

        /**
         * 保存客户账户信息
         * @param customerInfoAccount
         * @return
         */
        String saveCustomerAccountInfo(CustomerInfoAccountVo customerInfoAccount);

        //返回token信息
        public String rstToken(CustomerInfoAccountVo infoAccountVo, Long accountUid);

        /**
         * 获取手机号登录
         * @param
         */
        public String gainCustomerInfo(CustomerInfoAccountVo customerInfoAccountVo) throws Exception;

        /**
         * 获取当前客户基本信息
         * @return
         */
        public CustomerInfoVo getCustomerInfo();

        /**
         * 获取客户的简单信息
         * @return
         */
        public CustomerInfoVo getCustomerSimpleInfo(BaseQuery query);

        /**
         * 手机号登录
         * @return
         */
        public String PhoneLogin(CustomerPhoneLoginVo customerPhoneLoginVo);

        /**
         * 通过微信获取手机号
         * @return
         */
        public String gainPhone(CustomerInfoAccountVo customerInfoAccountVo) throws Exception;

        /**
         * 启动或锁定账号信息
         * @param customerInfo
         * @return
         */
        public Boolean updateCustomerAccountStatus(CustomerInfoLevelVo customerInfo);

        /**
         * 判断当前客户账号是否锁定
         */
        public Boolean getIsLockAccount(Long custoemrUid);

        /**
         * 根据openid查看用户信息
         * @param openID
         * @return
         */
        public HashMap getCustomerInfoByOpenId(String openID);

        /**
         * 锁定或启动指定账号信息
         * @param customerInfoAccount
         * @return
         */
        public Boolean updateAccountStatusById(CustomerInfoAccount customerInfoAccount);

        /**
         * 保存公众号登录返回客户信息
         * @param infoAccountVo
         * @return
         */
        public String allworkLogin(CustomerInfoAccountVo infoAccountVo);

        /**
         * 创建账号
         * @param account
         * @return
         */
       public  Boolean createCustomerAccount(CustomerInfoAccountVo account);

        public Boolean resetCustomerPassword(CustomerInfoAccountVo account);

        /**
         * 找回密码
         * @param account
         * @return
         */
       public Boolean retrievePwd(CustomerInfoAccountVo account);
}
